home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: Philippe Verdy <100105.3120@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Passing multidemensional arrays to functions?
- Date: 2 Apr 1996 00:05:13 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4jpqvp$lhj@dub-news-svc-6.compuserve.com>
- NNTP-Posting-Host: ad15-078.compuserve.com
-
- jkohen@einstein.com.ar (Javier Kohen) s'Θcrit :
- > John Schell <jschell@aggie.mdn.com> wrote:
- >
- > >I am trying to pass a variable to a function but continue to get errors
- > >no matter
- > >what declaration I give the variable in the prototype statement.
- >
- > >The variable:
- > > float variable[1][2]
- >
- > >Can you make a sugestion as to what it should pass as?
- >
- > >Thanks
- > >John
- >
- > void ffunc(float f[1][2])
- > {
- > }
- >
- or also: void ffunc (float (*f)[2]) {...}
- because any first dimension size is compatible.
-
- > void main()
- > {
- > float farray[1][2];
- >
- > ffunc(farray);
- > }
- >
- >
-
-